package com.itheima.mystream;

import java.util.ArrayList;
import java.util.List;

public class Demo3 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>(List.of("张三丰", "张殿峰", "张四丰", "张无忌", "李四", "王五"));
        list.stream().filter(
                s -> s.startsWith("张")
        ).filter(
                s -> s.length() == 3
        ).filter(
                s -> s.endsWith("丰")
        ).forEach(System.out::println);
    }
}
